Function: image2html

CALL:

html = image2html(bimg, format)

DESCRIPTION:

Convert a bufferedimage to html code.

INPUT:

bimg java.awt.image.BufferedImage
An image with a buffer
format string
Possible values: jpg, png, bmp...

OUTPUT:

html string
e.g. <img src="data:image/%s;base64, iVBORw0KGgoAAA...... '></img>